{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## NEW FEATURES\n",
        "\n",
        "### 1. OpenAI Apps SDK Integration\n",
        "- **McpUseProvider** (`packages/mcp-use/src/react/McpUseProvider.tsx`) - New unified provider component\n",
        "  - Combines StrictMode, ThemeProvider, BrowserRouter, WidgetControls, ErrorBoundary\n",
        "  - Auto-sizing support with ResizeObserver\n",
        "  - Automatic basename calculation for routing\n",
        "  \n",
        "- **WidgetControls** (`packages/mcp-use/src/react/WidgetControls.tsx`) - New component (752 lines)\n",
        "  - Debug button for widget debugging\n",
        "  - View controls (fullscreen/pip)\n",
        "  - Shared hover logic\n",
        "  - Position customization\n",
        "  \n",
        "- **useWidget hook** (`packages/mcp-use/src/react/useWidget.ts`) - New hook\n",
        "  - Type-safe React adapter for OpenAI Apps SDK `window.openai` API\n",
        "  - Props access, state management, theme, display mode\n",
        "  - Action methods (callTool, sendFollowUpMessage, etc.)\n",
        "  \n",
        "- **ErrorBoundary** (`packages/mcp-use/src/react/ErrorBoundary.tsx`) - New component\n",
        "  - Error handling for widgets\n",
        "  \n",
        "- **Image** (`packages/mcp-use/src/react/Image.tsx`) - New component\n",
        "  - Image component for widgets\n",
        "  \n",
        "- **ThemeProvider** (`packages/mcp-use/src/react/ThemeProvider.tsx`) - New component\n",
        "  - Theme management for widgets\n",
        "\n",
        "### 2. Inspector Widget Support\n",
        "- **WidgetInspectorControls** (`packages/inspector/src/client/components/WidgetInspectorControls.tsx`) - New component (364 lines)\n",
        "  - Inspector-specific widget controls\n",
        "  - Widget state inspection\n",
        "  - Debug information display\n",
        "\n",
        "### 3. Enhanced Apps SDK Template\n",
        "- **Product Search Result Widget** (`packages/create-mcp-use-app/src/templates/apps-sdk/resources/product-search-result/`)\n",
        "  - New carousel component\n",
        "  - Accordion components\n",
        "  - Enhanced product display\n",
        "  - Fruits API integration with @tanstack/react-query\n",
        "  - 16 fruit images added to public/fruits/\n",
        "\n",
        "### 4. CLI Widget Building Enhancements\n",
        "- Support for folder-based widgets (widget.tsx in folders)\n",
        "- Public folder copying during build\n",
        "- SSR configuration improvements\n",
        "- Better Vite configuration for widget building\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## IMPROVEMENTS\n",
        "\n",
        "### 1. Inspector Component Enhancements\n",
        "- **OpenAIComponentRenderer** (`packages/inspector/src/client/components/OpenAIComponentRenderer.tsx`)\n",
        "  - Added memo for performance\n",
        "  - Enhanced height notification handling (`notifyIntrinsicHeight`)\n",
        "  - Better theme support (prevents flash)\n",
        "  - Widget state inspection support\n",
        "  - Improved dev mode detection\n",
        "  - Better CSP handling\n",
        "  \n",
        "- **ToolResultDisplay** (`packages/inspector/src/client/components/tools/ToolResultDisplay.tsx`)\n",
        "  - Major refactor (894 lines changed)\n",
        "  - Formatted content display for different content types\n",
        "  - Result history navigation\n",
        "  - Relative time display\n",
        "  - JSON validation and formatting\n",
        "  - Support for text, image, audio, resource_link, and resource content types\n",
        "  - Maximize/restore functionality\n",
        "  \n",
        "- **ToolsTab** (`packages/inspector/src/client/components/ToolsTab.tsx`)\n",
        "  - Resizable panels with collapse support\n",
        "  - Maximize functionality for result panel\n",
        "  - Better mobile view handling\n",
        "\n",
        "### 2. Server-Side Improvements\n",
        "- **shared-routes.ts** (`packages/inspector/src/server/shared-routes.ts`)\n",
        "  - Enhanced dev widget proxy\n",
        "  - Better asset loading for dev mode\n",
        "  - CSP violation warnings\n",
        "  - Improved Vite HMR WebSocket handling\n",
        "  - Base tag injection for proper routing\n",
        "  \n",
        "- **shared-utils.ts** and **shared-utils-browser.ts**\n",
        "  - Improved widget security headers\n",
        "  - Better CSP configuration\n",
        "\n",
        "### 3. Template Improvements\n",
        "- **apps-sdk template** (`packages/create-mcp-use-app/src/templates/apps-sdk/`)\n",
        "  - Updated README with better documentation\n",
        "  - Enhanced example (get-brand-info tool)\n",
        "  - Fruits API endpoint\n",
        "  - Better styling and theming\n",
        "  - Removed old display-weather widget\n",
        "\n",
        "### 4. CLI Improvements\n",
        "- **CLI index.ts** (`packages/cli/src/index.ts`)\n",
        "  - Better server waiting with AbortController\n",
        "  - Support for folder-based widgets\n",
        "  - Public folder copying\n",
        "  - Enhanced SSR configuration\n",
        "  - Better error handling\n",
        "\n",
        "### 5. Code Quality\n",
        "- Improved logging throughout\n",
        "- Better code formatting and readability\n",
        "- Enhanced type safety\n",
        "- Better error handling\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## BUG FIXES\n",
        "\n",
        "### 1. Widget Rendering\n",
        "- Fixed iframe height calculation issues\n",
        "- Fixed theme flashing on widget load\n",
        "- Fixed CSP header generation for dev mode\n",
        "- Fixed asset loading in dev widget proxy\n",
        "\n",
        "### 2. Inspector Issues\n",
        "- Fixed console logging in iframe\n",
        "- Fixed widget state inspection\n",
        "- Fixed resizable panel collapse behavior\n",
        "- Fixed mobile view handling\n",
        "\n",
        "### 3. Build Process\n",
        "- Fixed widget metadata extraction\n",
        "- Fixed Vite SSR configuration\n",
        "- Fixed public asset copying\n",
        "- Fixed widget name resolution for folder-based widgets\n",
        "\n",
        "### 4. Documentation\n",
        "- Fixed Supabase deployment script\n",
        "- Updated deployment command syntax\n",
        "- Added server inspection URL to documentation\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## REMOVED/DEPRECATED\n",
        "\n",
        "### Removed Components\n",
        "- **WidgetDebugger** (`packages/mcp-use/src/react/WidgetDebugger.tsx`) - Removed (1051 lines)\n",
        "  - Functionality moved to WidgetControls\n",
        "  \n",
        "- **WidgetFullscreenWrapper** (`packages/mcp-use/src/react/WidgetFullscreenWrapper.tsx`) - Removed (365 lines)\n",
        "  - Functionality integrated into McpUseProvider and WidgetControls\n",
        "  \n",
        "- **display-weather.tsx** (`packages/create-mcp-use-app/src/templates/apps-sdk/resources/display-weather.tsx`) - Removed (103 lines)\n",
        "  - Replaced with product-search-result widget\n",
        "\n",
        "### Updated Exports\n",
        "- `packages/mcp-use/src/react/index.ts` - Updated exports\n",
        "  - Removed WidgetDebugger and WidgetFullscreenWrapper\n",
        "  - Added ErrorBoundary, Image, ThemeProvider, WidgetControls, McpUseProvider\n",
        "  - Reorganized exports for better organization\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## DEPENDENCIES\n",
        "\n",
        "### New Dependencies\n",
        "- @tanstack/react-query (for fruits API in template)\n",
        "- Additional React Router dependencies\n",
        "\n",
        "### Updated Dependencies\n",
        "- Various package updates in package.json files\n",
        "- New bun.lock file (3369 lines)\n",
        "- Updated pnpm-lock.yaml (2448 lines added)\n",
        "\n",
        "## CONFIGURATION CHANGES\n",
        "\n",
        "### New Files\n",
        "- `libraries/typescript/bun.lock` - New lockfile\n",
        "- `libraries/typescript/.gitignore` - Updated to ignore lockfiles\n",
        "- Multiple fruit images in `public/fruits/` directory\n",
        "\n",
        "### Modified Configurations\n",
        "- `vite.config.ts` - Enhanced SSR configuration\n",
        "- `package.json` files - Updated dependencies\n"
      ]
    }
  ],
  "metadata": {
    "language_info": {
      "name": "python"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 2
}
